<template>
	<view class="about">
		<view class="head">
			<image src="/static/about/头像.jpg" class="rounded-circle"
				style="width: 100rpx; height: 100rpx;border-radius: 50rpx;">
			</image>
			<view class="user">
				<view class="username">Caesar</view>
				<view class="userid">User ID: 15309036522</view>
			</view>
			<text class="iconfont icon-bangzhujinru"></text>
		</view>
		<!-- 互动信息栏 -->
		<view class="list">
			<view class="item" style="border-right: solid 1px #d3d3d3;">
				<image src="../../static/about/map.jpg" mode=""></image>
				<view class="iconfont">订单</view>
			</view>
			<view class="item" style="border-right: solid 1px #d3d3d3;">
				<image src="../../static/about/wallet.jpg" mode=""></image>
				<view class="iconfont">钱包</view>
			</view>
			<view class="item" style="border-right: solid 1px #d3d3d3;">
				<image src="../../static/about/settings.jpg" mode=""></image>
				<view class="iconfont">设置</view>
			</view>
			<view class="item" >
				<image src="../../static/about/service.jpg" mode=""></image>
				<view class="iconfont">客服</view>
			</view>
		</view>

		<view class="userinfo">
			<view class="userlist" style="border-bottom: solid 1px #d3d3d3; ">
				账号与安全
			</view>
			<view class="userlist" style="border-bottom: solid 1px #d3d3d3;">
				资料编辑
			</view>
			<view class="userlist" style="border-bottom: solid 1px #d3d3d3;">
				清除缓存
			</view>
			<view class="userlist" style="border-bottom: solid 1px #d3d3d3;">
				意见反馈
			</view>
			<view class="userlist">
				关于社区
			</view>

			<view class="py-2 py-3">
				<button class="bg-main text-white" style="border-radius: 20rpx; border: 0; margin-bottom: 10rpx;" type="primary" @click="toIndex">返回主页</button>
			</view>
			<view class="py-2 py-3">
				<button class="bg-main text-white" style="border-radius: 20rpx; border: 0;" type="primary" @click="toLogin">退出登录</button>
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {


			}
		},
		methods: {
			toLogin(){
				uni.redirectTo({
					url:"/pages/login/login"
				})
			},
			toIndex(){
				uni.redirectTo({
					url:"/pages/index_driver/index_driver"
				})
			}
		}
	}
</script>

<style lang="scss">
	.about {
		background-color: rgb(241,242,246);
		.head {
			display: flex;
			justify-content: flex-start;

			vertical-align: middle;

			.user {
				.username {
					font-size: 50rpx;
				}

				.userid {
					font-size: 25rpx;
				}

			}
		}

		.list {
			// border: 1px solid #fff;
			box-shadow: 1px 1px 5px rgb(226,229,234);
			-webkit-box-shadow: 1px 1px 5px rgb(226,229,234);
			-moz-box-shadow: 1px 1px 5px rgb(226,229,234);
			padding: 0;
			height: 150rpx;
			margin: 10rpx;
			border-radius: 10px;
			display: flex;
			align-items: center;
			justify-content: space-around;
			background-color: rgb(229, 229, 229);


			.item {

				image {
					width: 40px;
					height: 40px;
					margin-right: 40rpx;
				}

				// margin-left: 40rpx;
			}
		}

		.userinfo {
			border-radius: 10rpx;
			background-color: #fff;
			margin-top: 30rpx;

			border-radius: 10rpx;
			margin-left: 10rpx;
			margin-right: 10rpx;
			border: 1px solid #fff;
			
			padding-left: 10rpx;
			padding-right: 10rpx;
			
			border-width: 5px 5px 5px 5px;
			box-shadow: 1px 1px 10px 1px rgb(226,229,234);
			-webkit-box-shadow: 1px 1px 10px 1px rgb(226,229,234);
			-moz-box-shadow: 1px 1px 10px 1px rgb(226,229,234);

			.userlist {
				padding-left: 20rpx;

				height: 120rpx;
				line-height: 120rpx;


			}

		}
	}
</style>


<!-- <template>
	<view>
		<view class="passenger" @click="toPassenger">
			前往乘客
		</view>
		<view class="driver" @click="toDriver">
			前往司机
		</view>
		<view class="login" @click="toLogin">
			前往登录获取token
		</view>
		<view class="test2" @click="toTest">
			前往测试页
		</view>
		<view class="getAllOrder" @click="getAllOrder">
			获取乘客所有订单
		</view>
	</view>
</template>

<script>
	//1.导入插件
	import amapFile from '@/libs/amap-wx.js'
	import utils from "../../common/utils.js"
	import uniIcons from "@/components/uni-icons/uni-icons.vue";
	const api = utils.websiteUrl;
	export default {
		data() {
			return {
				token: ''
			}
		},
		onLoad() {
			this.token = uni.getStorageSync('token')
		},
		methods: {
			toPassenger() {
				uni.redirectTo({
					url: "/pages/index/index"
				})
			},
			toDriver() {
				uni.redirectTo({
					url: "/pages/index_driver/index_driver"
				})
			},
			toLogin() {
				uni.redirectTo({
					url: "/pages/login/login"
				})
			},
			toTest() {
				uni.redirectTo({
					url: "/pages/test2/test2"
				})
			},
			getAllOrder() {
				let that = this;
				uni.request({
					url: api + "order/getAllOrder",
					method: 'GET',
					data: {

					},
					sslVerify: false,
					header: {
						'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
						'token': that.token
					},
					success: (res) => {
						console.log(res)
						if (res.data.code == '0') {
							console.log('获取所有订单s')
							console.log(res)
							that.haveOrder = true
							that.order = res.data.data
							that.markers = []
							let start1 = {
								id: 0,
								latitude: that.order.positionStartLatitude,
								longitude: that.order.positionStartLongitude,
								iconPath: "../../static/起点.png",
								width: 50,
								height: 50
							}
							let end1 = {
								id: 1,
								latitude: that.order.positionEndLatitude,
								longitude: that.order.positionEndLongitude,
								iconPath: "../../static/终点.png",
								width: 50,
								height: 50
							}
							that.markers.push(start1)
							that.markers.push(end1)
							that.points = []
							let start2 = {
								latitude: that.order.positionStartLatitude,
								longitude: that.order.positionStartLongitude
							}
							let end2 = {
								latitude: that.order.positionEndLatitude,
								longitude: that.order.positionEndLongitude,
							}
							that.points.push(start2)
							that.points.push(end2)
							// that.getPlanningRoute(start2, end2, 10)
						} else {
							console.log('获取所有订单e')
							console.log(res)
						}
					},
					fail: (err) => {
						console.log("获取所有订单f" + err)
					}
				})
			}
		

		}
	}
</script>

<style>

</style> -->